package com.base.cn.platform.os.service.exam.correct;

import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.exam.ExamBaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * 试题纠错接口
 *
 * @author s.li
 * @date 2018/12/12
 */
@FeignClient(name = ExamBaseService.appName,configuration = FeignAuthConfig.class)
public interface ExamQuestionCorrectService extends ExamBaseService {

    /**
     * 保存试题纠错
     * @param correct 数据对象
     * @return Map<String,Object>
     */
    @RequestMapping(contextPath + "/saveExamQuestionCorrect")
    Map<String,Object> saveExamQuestionCorrect(@RequestBody Map<String, Object> correct);

    /**
     * 分页查询试题纠错数据列表
     * @param condition 查询条件
     * @param currentPage 页码
     * @param pageSize 查询数据
     * @return PageInfo<ExamQuestionCorrect>
     */
    @RequestMapping(contextPath + "/findExamQuestionCorrectPage")
    Map<String,Object> findExamQuestionCorrectPage(@RequestBody Map<String, Object> condition,
                                                   @RequestParam("currentPage") int currentPage,
                                                   @RequestParam("pageSize") int pageSize);

    /**
     * 修改纠错记录状态
     * @param ids ID串
     * @param status 状态，2已解决，3删除
     * @return Map<String,Object>
     */
    @RequestMapping(contextPath + "/updateQuestionCorrectStatus")
    Map<String,Object> updateQuestionCorrectStatus(@RequestParam("ids") String ids,
                                                   @RequestParam("status") int status);

    /**
     * 通过ID，查询 纠错对象
     * @param condition
     * @return Map<String,Object>
     */
    @RequestMapping(contextPath + "/findExamQuestionCorrectById")
    Map<String,Object> findExamQuestionCorrectById(@RequestBody Map<String, Object> condition);
}
